jQuery(document).ready(function () {

})
function doAdd() {
    if ($("#userId").val()==''||$("#userId").val()==null){
        layer.msg("请输入员工工号！");return;
    }
    if ($("#userName").val()==''||$("#userName").val()==null){
        layer.msg("请输入员工姓名！");return;
    }
    if( $('input:radio:checked').val()==null){
        layer.msg("请勾选性别！");
        return;
    }
    if ($("#departId").val()=='-1'||$("#departId").val()==''||$("#departId").val()==null){
        layer.msg("请选择员工部门！");return;
    }
    showMode();
    $.ajax({
        type: "POST",
        data: $('#updateForm').serializeArray(),
        url: rootPath + "/userManage/ajax/addUser",
        dataType: 'json',
        success: function (data, textStatus) {
            if (data.code == '0000') {
                parent.commonJs.alertMsg(data.msg, function () {
                    closeWindow();
                    closeMode();
                });
            } else {
                commonJs.alertMsg(data.msg, function () {
                    closeMode();
                });
            }
        }
    });
}

function closeWindow(){
    window.parent.selectList();
    window.parent.layer.closeAll();
}